import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/login',
      component: () => import('@/views/LoginHome')
    },
    {
      path: '/',
      component: () => import('@/views/LoginHome')
    },
    {
      path: '/layout',
      component: () => import('@/views/layout/LayoutIndex'),
      redirect: '/dashboard',
      children: [
        {
          path: '/dashboard',
          component: () => import('@/views/layout/dashboard/index')
        },
        {
          path: '/home',
          component: () => import('@/views/layout/home/homepage')
        },
        {
          path: '/home/homepage',
          component: () => import('@/views/layout/home/homepage')
        },
        {
          path: '/home/homepage1',
          component: () => import('@/views/layout/home/homepage1')
        },
        {
          path: '/home/homepage2',
          component: () => import('@/views/layout/home/homepage2')
        },
        {
          path: '/home/area',
          component: () => import('@/views/layout/home/area')
        },
        {
          path: '/home/area1',
          component: () => import('@/views/layout/home/area1')
        },
        {
          path: '/home/area2',
          component: () => import('@/views/layout/home/area2')
        },
        {
          path: '/home/location',
          component: () => import('@/views/layout/home/location')
        },
        {
          path: '/home/view',
          component: () => import('@/views/layout/home/view')
        }
      ]
    }
  ]
})

export default router
